/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = wtc_packet.h                                      */
/*  NOTE      =                                                    */
/*  DATE      = 2015/08/13 by songbb                               */
/*******************************************************************/

#ifndef __WTC_PACKET_H_
#define __WTC_PACKET_H_

#include "wtc_core.h"

#define APM_WTC_PACKET_FRAGMENTED 0
#define APM_WTC_PACKET_UNFRAGMENTED 1
#define APM_WTC_PACKET_ERROR 2

#define APM_WTC_CHECK_FRAGMENT_SUCCESS 0
#define APM_WTC_CHECK_FRAGMENT_NEED_NEXT_PACKET 1
#define APM_WTC_CHECK_FRAGMENT_ERROR 2

#define WTC_FRAGMENT2STR(x) ((x==APM_WTC_PACKET_FRAGMENTED)?"FRAGMENTED": \
                                 ((x==APM_WTC_PACKET_UNFRAGMENTED)?"UNFRAGMENTED": \
                                 ((x==APM_WTC_PACKET_ERROR)?"ERROR":"UNKNOWN")))

int wtc_init_packet(L7_wtc_packet *p_st_wtc_packet);

int wtc_packet_unfragment(L7session_wtc *p_st_sess
                        , Apm_packet *p_st_packet
                        , L7_wtc_packet *p_st_wtc_packet);

#endif
